<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../../Templates/SubFolderTemplate.xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    <ui:define name="head-title">
        <title>Delete Employee | Merlion's ERP System</title>
    </ui:define>
    
    <ui:define name="content">
        <f:view beforePhase="#{deleteEmployeeManagerBean.initView}">        
        <h:form>
                               
            <p:panel id="panel" header="Delete Employee"> 
                <p:ajaxStatus style="width:16px;height:16px;">   
                    <f:facet name="start">   
                        <p:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" /> 
                    </f:facet> 
 
                    <f:facet name="complete">   
                        <h:outputText value="" />   
                    </f:facet>   
                </p:ajaxStatus> 
 
                <p:messages /> 
 
                <h:panelGrid columns="3" cellpadding="10"> 
                    
                    <h:outputText style="font-weight: bold" value="Employee's ID:"/>
                    <h:outputText value="#{deleteEmployeeManagerBean.employeeToDelete.employeeId}"/>
                    <br/>
                    
                    <h:outputLabel for="employeeUserName" style="font-weight: bold" value="Username: " /> 
                    <h:outputLabel value="#{deleteEmployeeManagerBean.employeeToDelete.userName}" id="employeeUserName"/>
                    <br/>
                    
                    <h:outputLabel for="employeeName" style="font-weight: bold" value="Name: " /> 
                    <h:outputLabel value="#{deleteEmployeeManagerBean.employeeToDelete.employeeName}" id="employeeName"/>
                    <br/>
                    
                    <h:outputLabel for="employeeNRIC" style="font-weight: bold" value="NRIC: " /> 
                    <h:outputLabel value="#{deleteEmployeeManagerBean.employeeToDelete.employeeNRIC}" id="employeeNRIC"/>
                    <br/>
                    
                    <h:outputText style="font-weight: bold" value="Employee's Adress:"/>
                    <h:outputText value="#{deleteEmployeeManagerBean.employeeToDelete.employeeAddress}"/>
                    <br/>
                    
                    <h:outputText style="font-weight: bold" value="Employee's Email Address:"/>
                    <h:outputText value="#{deleteEmployeeManagerBean.employeeToDelete.employeeEmail}"/>
                    <br/>
                    
                    <h:outputText style="font-weight: bold" value="Employee's Contact Number:"/>
                    <h:outputText value="#{deleteEmployeeManagerBean.employeeToDelete.employeeContactNumber}"/>
                    
                </h:panelGrid>                
                <p:commandButton id="btn" value="Delete" update="panel" actionListener="#{deleteEmployeeManagerBean.deleteEmployee}" ajax="true" />
            </p:panel> 
        </h:form>
            
        </f:view>
    </ui:define>

</ui:composition>
